package com.changgou.goods.feign;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Sku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 根据spuid查询sku信息
 */
@FeignClient("goods")//指定操作的是哪个服务
public interface SkuFeign {

  @GetMapping(value = "/sku/spu/{spuId}")
  List<Sku> findSkuListBySpuId(@PathVariable String spuId);


  /***
   * 根据ID查询数据sku
   * @param id
   * @return
   */
  @GetMapping("/sku/{id}")
   Result findById(@PathVariable String id);
}
